<template>
  <el-dialog title="详情" :close-on-click-modal="false" :visible.sync="visible">
    <el-row :gutter="24"><el-col :span="6">订单号：{{ suId }}</el-col>
    <el-col :span="6" :offset="12">状态：{{statu }}</el-col>
    </el-row>
    <el-table :data="datalist">
      <el-table-column prop="goodsName" label="商品名称"></el-table-column>
      <!-- <el-table-column prop="price" label="单价"></el-table-column> -->
      <el-table-column prop="goodsNum" label="数量"></el-table-column>
      <el-table-column prop="price" label="小计"></el-table-column>
    </el-table>
    <el-row :gutter="24">
      <el-col :span="8">
        司机姓名： {{ sjName }}
      </el-col>
      <el-col :span="10" :offset="6">
        {{ createDate }}
      </el-col>
    </el-row>
    <span>供货点名称：{{ ghName }}</span>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="visible = false">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      datalist: [],
      visible: false,
      orderid: "",
      suId:"",
      statu:"",
      sjName:"",
      ghName:"",
      createDate:"",
      dataForm: {
        id: 0,
      },
    }
  },
  methods: {
    init(id) {
      this.dataForm.id = id || 0
      this.visible = true
      this.$nextTick(() => {
        if (this.dataForm.id) {
          this.$http({
            url: this.$http.adornUrl(`/supplier/ssmsudetails/info/${this.dataForm.id}`),
            method: 'get',
            params: this.$http.adornParams()
          }).then(({ data }) => {
            if (data && data.code === 0) {
              this.datalist = data.sudetailsDto
              this.suId=data.sudetailsDto[0].suId
              this.sjName=data.sudetailsDto[0].sjName
              this.statu=data.sudetailsDto[0].state
              this.ghName=data.sudetailsDto[0].ghName
              this.createDate=data.sudetailsDto[0].createDate

            }
          })
        }
      })
    },
    // 表单提交

  }
}
</script>
